/* -*- Mode: c; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/*
  RefObject (http://code.google.com/p/refobject/)
  Copyright (C) 2010-2011 MIURA Shirow (sharow)
*/

#ifndef INCLUDED_REFOBJECT_H
#define INCLUDED_REFOBJECT_H


typedef struct RefObject_ RefObject;
typedef void (*RefObjectDestructor)(RefObject *aRefObject);
typedef void RefTypeObject;

int RefObject_SizeOf(void);
void *RefObject_Construct(RefObject *aRefObject, RefTypeObject **aTypeObject, RefObjectDestructor aDestructor);
void RefObject_IncRef(RefObject *aRefObject);
void RefObject_XIncRef(RefObject *aRefObject);
int RefObject_DecRef(RefObject *aRefObject);
int RefObject_XDecRef(RefObject *aRefObject);
void *RefObject_GetObject(RefObject *aRefObject);
RefTypeObject **RefObject_GetTypeObject(RefObject *aRefObject);


#endif
